-- @Author: 作者QQ381990860
-- @Date:   2021-09-07 12:15:13
-- @Last Modified by:   作者QQ381990860
-- @Last Modified time: 2022-07-23 06:58:58
-- @Author: 作者QQ381990860
-- @Date:   2021-09-07 12:15:13
-- @Last Modified by:   作者QQ381990860
-- @Last Modified time: 2021-09-07 14:00:59
--======================================================================--
-- @作者: QQ381990860
-- @创建时间:   2019-12-03 02:17:19
-- @Last Modified time: 2020-11-17 01:24:20
--======================================================================--
local 场景类_VIP系统栏 = class(窗口逻辑)

local zts,zts1,tp,zts2
local insert = table.insert
function 场景类_VIP系统栏:初始化(根)
    self.ID = 577
    self.x = 100+(全局游戏宽度-800)/2
    self.y = 90
    self.xx = 0
    self.yy = 0
    self.注释 = "VIP系统栏"
        tp = 根
end
function 场景类_VIP系统栏:加载(根)

    self.鼠标 = false
    self.焦点 = false
    self.可移动 = true
    local 资源 = 根.资源
    local 按钮 = 根._按钮
    local 自适应 = 根._自适应
    self.资源组 = {
        [1] = 自适应.创建(0,1,600,360,3,9),
        [2] = 按钮.创建(自适应.创建(18,4,16,16,4,3),0,0,4,true,true),
        [3] = 按钮.创建(自适应.创建(11,4,72,20,1,3),0,0,4,true,true,"累计充值"),
        [4] = 按钮.创建(自适应.创建(11,4,72,20,1,3),0,0,4,true,true,"静态抓鬼"),
        [5] = 按钮.创建(自适应.创建(11,4,72,20,1,3),0,0,4,true,true,"充值CDK"),
        [6] = 按钮.创建(自适应.创建(11,4,72,20,1,3),0,0,4,true,true,"领取奖励"),
        [7] = 按钮.创建(自适应.创建(11,4,72,20,1,3),0,0,4,true,true,"领取奖励"),
        [8] = 按钮.创建(自适应.创建(11,4,72,20,1,3),0,0,4,true,true,"领取奖励"),
        [9] = 按钮.创建(自适应.创建(11,4,72,20,1,3),0,0,4,true,true,"领取奖励"),
        [10] = 按钮.创建(自适应.创建(11,4,72,20,1,3),0,0,4,true,true,"领取奖励"),
        [11] = 按钮.创建(自适应.创建(11,4,72,20,1,3),0,0,4,true,true,"领取奖励"),
        [12] = 按钮.创建(自适应.创建(11,4,72,20,1,3),0,0,4,true,true,"领取奖励"),
        [13] = 按钮.创建(自适应.创建(11,4,72,20,1,3),0,0,4,true,true,"领取奖励"),
        [14] = 按钮.创建(自适应.创建(11,4,72,20,1,3),0,0,4,true,true,"领取奖励"),
        [15] = 按钮.创建(自适应.创建(11,4,72,20,1,3),0,0,4,true,true,"领取奖励"),
        [16] = 按钮.创建(自适应.创建(11,4,72,20,1,3),0,0,4,true,true,"进入下页"),
        [17] = 按钮.创建(自适应.创建(11,4,72,20,1,3),0,0,4,true,true,"开启抓鬼"),
        [18] = 按钮.创建(自适应.创建(11,4,72,20,1,3),0,0,4,true,true,"停止抓鬼"),
        [19] = 按钮.创建(自适应.创建(11,4,72,20,1,3),0,0,4,true,true,"进入上页"),
        [20] = 按钮.创建(自适应.创建(11,4,72,20,1,3),0,0,4,true,true,"月卡系统"),
        [21] = 按钮.创建(自适应.创建(11,4,72,20,1,3),0,0,4,true,true,"领取福利"),

        ------------------------------------------------------------------以上是双字低级兽决
    }
    for n=2,21 do
       self.资源组[n]:绑定窗口_(577)
    end
    self.装饰 = 资源:载入('JM.dll',"网易WDF动画",0x13DF95A6)--边框
    self.动态1 = 资源:载入('JM.dll',"网易WDF动画",0x3964E8DD)--边框
    self.动态2 = 资源:载入('JM.dll',"网易WDF动画",0x891CA42C)--边框
    self.动态3 = 资源:载入('JM.dll',"网易WDF动画",0x66DEB664)--边框



    -- self.资源组[3]:置偏移(-1,0)
    self.窗口时间 = 0
    进程 = 1

    zts = tp.字体表.华康字体
    zts1 = tp.字体表.华康字体
    zts2 = tp.字体表.普通字体_
end

function 场景类_VIP系统栏:打开(数据)
    if self.可视 then
        进程 = 1
        self.可视 = false
    else
    if  self.x > 全局游戏宽度 then
       self.x = 260+(全局游戏宽度-800)/2
    end
    self:加载(tp)
    self.数据=数据
        insert(tp.窗口_,self)

        tp.运行时间 = tp.运行时间 + 1
        self.窗口时间 = tp.运行时间
        self.可视 = true
    end
end

function 场景类_VIP系统栏:刷新信息(数据)
    self.数据=数据
end

function 场景类_VIP系统栏:刷新抓鬼信息(数据)
    --self.数据.自动抓鬼=数据.自动抓鬼
end

function 场景类_VIP系统栏:显示(dt,x,y)
    cz = self.数据
    self.焦点 = false
    for i=2,21 do
        self.资源组[i]:更新(x,y)
    end
    self.资源组[6]:更新(x,y,cz.VIP领取==0 and cz.角色累充 >= cz.系统累充.VIP1)
    self.资源组[7]:更新(x,y,cz.VIP领取==1 and cz.角色累充 >= cz.系统累充.VIP2)
    self.资源组[8]:更新(x,y,cz.VIP领取==2 and cz.角色累充 >= cz.系统累充.VIP3)
    self.资源组[9]:更新(x,y,cz.VIP领取==3 and cz.角色累充 >= cz.系统累充.VIP4)
    self.资源组[10]:更新(x,y,cz.VIP领取==4 and cz.角色累充 >= cz.系统累充.VIP5)
    self.资源组[11]:更新(x,y,cz.VIP领取==5 and cz.角色累充 >= cz.系统累充.VIP6)
    self.资源组[12]:更新(x,y,cz.VIP领取==6 and cz.角色累充 >= cz.系统累充.VIP7)
    self.资源组[13]:更新(x,y,cz.VIP领取==7 and cz.角色累充 >= cz.系统累充.VIP8)
    self.资源组[14]:更新(x,y,cz.VIP领取==8 and cz.角色累充 >= cz.系统累充.VIP9)
    self.资源组[15]:更新(x,y,cz.VIP领取==9 and cz.角色累充 >= cz.系统累充.VIP10)
    self.装饰:更新(dt)
    self.动态1:更新(dt)
    self.动态2:更新(dt)
    self.动态3:更新(dt)

    if self.资源组[2]:事件判断() then
        self:打开()
        return false
    elseif self.资源组[3]:事件判断() then
        进程 = 1
    elseif self.资源组[4]:事件判断() then
        进程 = 3
    elseif self.资源组[20]:事件判断() then
        进程 = 4
    elseif self.资源组[17]:事件判断() then
        客户端:发送数据(1, 1, 131, "P7")
    elseif self.资源组[18]:事件判断() then
        客户端:发送数据(1, 1, 131, "P7")
    elseif self.资源组[5]:事件判断() then
        tp.窗口.CDK:打开()
    elseif self.资源组[6]:事件判断() then
        客户端:发送数据(1, 1, 132, "P7")
    elseif self.资源组[7]:事件判断() then
        客户端:发送数据(1, 1, 132, "P7")
    elseif self.资源组[8]:事件判断() then
        客户端:发送数据(1, 1, 132, "P7")
    elseif self.资源组[9]:事件判断() then
        客户端:发送数据(1, 1, 132, "P7")
    elseif self.资源组[10]:事件判断() then
        客户端:发送数据(1, 1, 132, "P7")
    elseif self.资源组[11]:事件判断() then
        客户端:发送数据(1, 1, 132, "P7")
    elseif self.资源组[12]:事件判断() then
        客户端:发送数据(1, 1, 132, "P7")
    elseif self.资源组[13]:事件判断() then
        客户端:发送数据(1, 1, 132, "P7")
    elseif self.资源组[14]:事件判断() then
        客户端:发送数据(1, 1, 132, "P7")
    elseif self.资源组[15]:事件判断() then
        客户端:发送数据(1, 1, 132, "P7")
    elseif self.资源组[21]:事件判断() then
        客户端:发送数据(1, 1, 133, "P7")
    end
    self.资源组[1]:显示(self.x,self.y)
 tp.窗口标题背景_:显示(self.x+self.资源组[1].宽度/2-70,self.y+0)
    --Picture.标题:显示(self.x+200,self.y)
    zts1:置字间距(3)
    zts1:置颜色(0xFFFFFFFF):显示(self.x+266,self.y+3,"VIP系统")
    zts1:置颜色(0xFFFFFFFF):显示(self.x+190,self.y+30,"累充金额：")
    zts1:置颜色(0xFF8C96F6):显示(self.x+268,self.y+30,cz.角色累充)
    zts1:置颜色(0xFFFFFFFF):显示(self.x+386,self.y+30,"VIP等级：")
    zts1:置颜色(0xFF8C96F6):显示(self.x+460,self.y+30,cz.VIP等级)
    self.资源组[2]:显示(self.x + 580,self.y + 3)
    self.资源组[3]:显示(self.x + 30,self.y + 80)
    self.资源组[4]:显示(self.x + 30,self.y + 110)
    self.资源组[20]:显示(self.x + 30,self.y + 140)
    self.资源组[5]:显示(self.x + 30,self.y + 170)
    self.动态3:显示(self.x + 10,self.y + 340)
    self.动态1:显示(self.x + 65,self.y + 360)
    self.装饰:显示(self.x + 5,self.y + 55)
    self.装饰:显示(self.x + 165,self.y + 55)
    self.装饰:显示(self.x + 343,self.y + 55)
    self.动态2:显示(self.x + 5,self.y + 290)
    self.动态2:显示(self.x + 165,self.y + 290)
    self.动态2:显示(self.x + 332,self.y + 290)
    if 进程 == 1 then
       zts1:置颜色(0xFFfefe63):显示(self.x+135,self.y+80,"累充"..cz.系统累充.VIP1.."元：")
       zts1:置颜色(0xFFfefe63):显示(self.x+135,self.y+110,"累充"..cz.系统累充.VIP2.."元：")
       zts1:置颜色(0xFFfefe63):显示(self.x+135,self.y+140,"累充"..cz.系统累充.VIP3.."元：")
       zts1:置颜色(0xFFfefe63):显示(self.x+135,self.y+170,"累充"..cz.系统累充.VIP4.."元：")
       zts1:置颜色(0xFFfefe63):显示(self.x+135,self.y+200,"累充"..cz.系统累充.VIP5.."元：")
       zts1:置颜色(0xFFfefe63):显示(self.x+135,self.y+230,"累充"..cz.系统累充.VIP6.."元：")
       zts1:置颜色(0xFFfefe63):显示(self.x+135,self.y+260,"累充"..cz.系统累充.VIP7.."元：")
       zts2:置颜色(0xFF8C96F6):显示(self.x+230,self.y+82,"金柳露*20、超级66*10、修炼果*20、坐骑礼包")
       zts2:置颜色(0xFF8C96F6):显示(self.x+230,self.y+112,"神兜兜*30、阵法碎片*50、陨铁*5、修炼果*20")
       zts2:置颜色(0xFF8C96F6):显示(self.x+230,self.y+142,"锦衣炼化*50、足迹炼化*50、光环炼化*50")
       zts2:置颜色(0xFF8C96F6):显示(self.x+230,self.y+172,"修炼果*99个、银子3E、储备5E、精炼(低)*10")
       zts2:置颜色(0xFF8C96F6):显示(self.x+230,self.y+202,"精炼(低)*30、一年魂石*50、培元汤*99")
       zts2:置颜色(0xFF8C96F6):显示(self.x+230,self.y+232,"培元汤*99、精炼(低)*50、幽魂之水*99")
       zts2:置颜色(0xFF8C96F6):显示(self.x+230,self.y+262,"锦衣炼化*99、足迹炼化*99、光环炼化*99")
       self.资源组[6]:显示(self.x + 515,self.y + 78,true)
       self.资源组[7]:显示(self.x + 515,self.y + 108,true)
       self.资源组[8]:显示(self.x + 515,self.y + 138,true)
       self.资源组[9]:显示(self.x + 515,self.y + 168,true)
       self.资源组[10]:显示(self.x + 515,self.y + 198,true)
       self.资源组[11]:显示(self.x + 515,self.y + 228,true)
       self.资源组[12]:显示(self.x + 515,self.y + 258,true)
       if cz.VIP领取 >= 7 then
          self.资源组[16]:显示(self.x + 515,self.y + 300,true)
       end
       if self.资源组[16]:事件判断() then
          进程 = 2
       end
    elseif 进程 == 2 then
       zts1:置颜色(0xFFfefe63):显示(self.x+135,self.y+80,"累充"..cz.系统累充.VIP8.."元：")
       zts1:置颜色(0xFFfefe63):显示(self.x+135,self.y+110,"累充"..cz.系统累充.VIP9.."元：")
       zts1:置颜色(0xFFfefe63):显示(self.x+135,self.y+140,"累充"..cz.系统累充.VIP10.."元：")
       zts2:置颜色(0xFF8C96F6):显示(self.x+230,self.y+82,"150级紫装宝盒*5、随机法宝礼盒、陨铁*30")
       zts2:置颜色(0xFF8C96F6):显示(self.x+230,self.y+112,"150级橙装宝盒*2、银子10E、紫金丹*50")
       zts2:置颜色(0xFF8C96F6):显示(self.x+230,self.y+142,"银子20E、储备10E、十年魂石*30")
       self.资源组[19]:显示(self.x + 515,self.y + 300,true)
       if self.资源组[19]:事件判断() then
          进程 = 1
       end
       self.资源组[13]:显示(self.x + 515,self.y + 78,true)
       self.资源组[14]:显示(self.x + 515,self.y + 108,true)
       self.资源组[15]:显示(self.x + 515,self.y + 138,true)
    elseif 进程 == 3 then
        zts1:置颜色(0xFFfefe63):显示(self.x+195,self.y+80,"静态抓鬼的意思就是站在原地不进战斗")
        zts1:置颜色(0xFFfefe63):显示(self.x+215,self.y+100,"直接获得经验、银子和物品奖励")
        zts1:置颜色(0xFF8C96F6):显示(self.x+235,self.y+120,"当前可用抓鬼次数为：")
        zts1:置颜色(0xFFf90101):显示(self.x+397,self.y+120,cz.自动抓鬼.次数)
        if cz.自动抓鬼.开启==false then
           self.资源组[17]:显示(self.x + 295,self.y + 228,true)
        else
           self.资源组[18]:显示(self.x + 295,self.y + 228,true)
        end
    elseif 进程 == 4 then
        zts1:置颜色(0xFFfefe63):显示(self.x+195,self.y+80,"月卡会员每日领取奖励如下↓")
        zts1:置颜色(0xFF8C96F6):显示(self.x+235,self.y+100,"银子*2000W")
        zts1:置颜色(0xFF8C96F6):显示(self.x+235,self.y+120,"储备*4000W")
        zts1:置颜色(0xFF8C96F6):显示(self.x+235,self.y+140,"仙玉*10000")
        zts1:置颜色(0xFF8C96F6):显示(self.x+235,self.y+160,"静态抓鬼*200")
        zts1:置颜色(0xFF8C96F6):显示(self.x+235,self.y+180,"抽奖次数*1")
        if cz.VIP月卡.次数 == 0 then
           zts1:置颜色(0xffffbe9c):显示(self.x+205,self.y+200,"你当前暂未开通月卡会员")
        else
           zts1:置颜色(0xffffbe9c):显示(self.x+155,self.y+200,"您已经是我们尊贵的月卡会员，剩余月卡次数为：  次")
           zts1:置颜色(0xffaf140c):显示(self.x+525,self.y+200,cz.VIP月卡.次数)
        end
        self.资源组[21]:显示(self.x + 265,self.y + 258,true)

    end
end



return 场景类_VIP系统栏